-
Notifications
You must be signed in to change notification settings - Fork 415
Netlist Writer: write post synthesis netlist that can be simulated #1957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netlist Writer: write post synthesis netlist that can be simulated #1957
Conversation
97ce5f6
to
acbde85
Compare
Signed-off-by: Pawel Czarnecki <[email protected]>
Change access specifiers from private to protected for some members of NetlistWriterVisitor to make those visible in class that will derive from the visitor. Signed-off-by: Pawel Czarnecki <[email protected]>
…ntifiers Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
c2ee265
to
1c6150c
Compare
Signed-off-by: Paweł Czarnecki <[email protected]>
1c6150c
to
7952b53
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I believe that @vaughnbetz had some comments regarding the naming of the --post_synthesis_netlist
step which might need to be changed to something else, e.g. --post_implementation_netlist
or similar, as it happens after the whole place and route stages.
…ged_netlist Signed-off-by: Paweł Czarnecki <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just suggest changing the name thoughout from post_synthesis to post_implementation; also have a few minor commenting suggestions and fixes.
@@ -1254,6 +1254,14 @@ Analysis Options | |||
|
|||
**Default:** ``off`` | |||
|
|||
.. option:: --gen_post_synthesis_merged_netlist { on | off } | |||
|
|||
This option is based on ``--gen_post_synthesis_netlist``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "a single verilog file"
I think we should change the name to --gen_post_implementation_netlist, as @acomodi suggests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typo and renamed option
This option is based on ``--gen_post_synthesis_netlist``. | ||
The difference is that ``--gen_post_synthesis_merged_netlist`` generates only single verilog file with merged top module multi-bit ports of the implemented circuit. | ||
The name of the file is ``<basename>_merged_post_synthesis.v`` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably rename the output file to _post_implementation.v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -623,6 +623,7 @@ static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysi | |||
} | |||
|
|||
analysis_opts.gen_post_synthesis_netlist = Options.Generate_Post_Synthesis_Netlist; | |||
analysis_opts.gen_post_synthesis_merged_netlist = Options.Generate_Post_Synthesis_Merged_Netlist; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name -> post_implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
vpr/src/base/netlist_writer.cpp
Outdated
@@ -2099,6 +2120,187 @@ class NetlistWriterVisitor : public NetlistVisitor { | |||
struct t_analysis_opts opts_; | |||
}; | |||
|
|||
/** | |||
* @brief A class which writes post-synthesis merged netlists (Verilog) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
post synthesis --> post implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -2124,6 +2326,23 @@ void netlist_writer(const std::string basename, std::shared_ptr<const AnalysisDe | |||
nl_walker.walk(); | |||
} | |||
|
|||
///@brief Main routing for this file. See netlist_writer.h for details. | |||
void merged_netlist_writer(const std::string basename, std::shared_ptr<const AnalysisDelayCalculator> delay_calc, struct t_analysis_opts opts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Main routing" should be "Main routine"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typo
@@ -208,6 +208,7 @@ struct t_options { | |||
/* Analysis options */ | |||
argparse::ArgValue<bool> full_stats; | |||
argparse::ArgValue<bool> Generate_Post_Synthesis_Netlist; | |||
argparse::ArgValue<bool> Generate_Post_Synthesis_Merged_Netlist; | |||
argparse::ArgValue<int> timing_report_npaths; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment: post_synthesis -> post_implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed
b003083
to
c17f3dd
Compare
@acomodi, @vaughnbetz - thanks for the reviews! I've renamed all occurrences of |
Signed-off-by: Paweł Czarnecki <[email protected]>
c17f3dd
to
12830cd
Compare
protected: | ||
/** | ||
* @brief Returns the name of a wire connecting a primitive and global net. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does global net mean in this context? Just a net that is routed? (I'm guessing that).
Or an actual global (often not routed, on a special network) net?
Would be good to clarify.
Looks good to me.
|
This PR is a work in progress. It relies on code from 3 different PRs:
That is why it's based on top of concatenated commits from all 3 PRs. This will cause those commits to appear on the list of commits in this PR and in the diff. I will update this PR when the rest of PRs will be merged.
Description
This PR modifies the VPR Netlist Writer in order to allow writing Verilog and SDF files that can be simulated. The changes include:
NetlistWriterVisitor
fromprivate
toprotected
MergedNetlistWriterVisitor
that inherits fromNetlistWriterVisitor
and overrides some of its behaviour in order to write another verilog netlist that will have its multi-bit top module ports merged so that we have code like this:instead of this:
--gen_post_synthesis_merged_netlist
that enables second verilog writer[
and]
in Black Box cell instancing in SDF filesRelated Issue
Issue was first described in #1946.
Motivation and Context
This change is required for performing simulation of post synthesis verilog files written by VPR without using any external scripts for adjusting VPR output. Simulations are part of Symbiflow testing procedure where verilog files with merged multi-bit ports of at least the top module are needed.
How Has This Been Tested?
New VPR build was used to generate verilog output for Symbiflow designs that were then simulated to verify the correctness of verilogs
Types of changes
Checklist: